
//尺寸变量
$w:200px;
$h:50px;
//下拉框混合宏定义
@mixin reset{
  *{
    margin: 0;
    padding: 0;
  }
  a{
    text-decoration: none;
  }
  ul,li,ol{
    list-style: none;
  }
}
@mixin dropTop(){
  .drop-top{
    position: relative;
    width: $w;
    height: $h;
    border-radius: 5px;
    background-color: #29b5ff;
    line-height: $h;
    text-align: center;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    &:hover{
      &:before{
        content: "";
        display: block;
        position: absolute;
        top:$h;
        width: 100%;
        height: 30px;
        background-color: #bbbbbb;
      }
      &:after{
        content: "";
        display: block;
        position: absolute;
        top:$h + 14px;
        left: 50%;
        margin-left: -8px;
        width: 0;
        height: 0;
        font-size: 0;
        border-width: 8px;
        border-color: transparent transparent #fff transparent;
        border-style: solid;
      }
    }
    .drop-list{
      @extend %visuallyHidden;
    }
  }
  .drop-top:hover .drop-list{
    @extend %visuallyShow;
    position: relative;
    width: 80%;
    left: 50%;
    top:30px;
    margin-left: -0.4*$w;
    border-radius: 4px;
    li{
      width: 100%;
      height: $h - 10px;
      line-height: $h - 10px;
      font-size: 14px;
      text-align: center;
      background-color: #ffffff;
      a{
        color: #000000;
        width: 80%;
        display: inline-block;
      }
    }
  }
  .drop-list a:hover{
    color: #29b5ff !important;
    font-size: 16px;
  }
}

//hide
%visuallyHidden{
  margin: -1px;
  padding: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  position: absolute;
}
//show
%visuallyShow{
  margin: 0;
  width: auto;
  height: auto;
  overflow: auto;
  clip: auto;
}



@include reset();
body{
  background-color: #bbbbbb;
}
#drop-wrap{
  width: 200px;
  margin: 50px auto;
}
@include dropTop();

